package com.gegewa.topic.rmi;

import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;

public class RmiServer {

    public static void main(String[] args) {
        Registry registry = null;
        try {
            registry = LocateRegistry.createRegistry(8080);

        } catch (RemoteException e) {
            e.printStackTrace();
        }

        try {
            HelloImpl hello = new HelloImpl();
            registry.rebind("hello", hello);
        } catch (RemoteException e) {
            e.printStackTrace();
        }
    }

}
